<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Getting sicker',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/04/10.jpg" alt="The office building" class="framed-centred-image" width="649" height="480"/>
<section id="dreams">
	
	<p>
		I dreamed about infommercials.
		In one of them, a child drowns before the lifeguard can rescue them, and the lifeguard says the child went &quot;back home&quot;.
		The child&apos;s sibling is confused, thinking the lifeguard is talking about their actual home, but the lifeguard says they mean &quot;way back home&quot;, to where the child lived before they came to this world so the surviving child &quot;wouldn&apos;t have to be lonely&quot;.
		The lifeguard is really calm throughout all of this, like there&apos;s no rush or anything, after the initial rush to try and fail to save the child before they drowned.
		After talking calmly and wasting time, they resuscitate the child, bringing them back to life.
		Like, dude.
		Hurry up before the child suffers brain damage!
	</p>
	<p>
		I can&apos;t quite remember the infommercial prior, but it involved the surviving child on a car trip with their parents.
	</p>
</section>
<section id="cheque">
	<h2>Lost pay cheque</h2>
	<p>
		I got to thinking about my next steps; what to do after talking to the head manager.
		I won&apos;t know for sure what needs to be done on my end until after I talk to them, but there&apos;s a good chance they&apos;ll tell me to take it up with the person in charge of the franchise.
		The head manager&apos;s not going to want to talk to the person in charge themself, not because the person in charge is mean, but because the head manager is lazy.
		That meant I should talk to the head manager as soon as possible tomorrow, so I&apos;d have enough time to bike to Eugene, where the person in charge&apos;s office is.
		I&apos;m not sure what hours the person in charge is in, and the head manager has a night shift, so the earlier I made got this over with, the more likely I&apos;d catch the person in charge.
		I should also know about where to find their office.
		I thought I remembered it was on Coberg Road, but it was easy enough to get the full address from a pay stub.
		Sure enough, it&apos;s on Coberg Road.
		So where <strong>*is*</strong> Coberg Road?
		I knew I&apos;d been there many times.
		If I could remember somewhere on that street I&apos;ve needed to go, I&apos;d be able to remember which of three routes I&apos;d taken into Eugene to get there.
		The $a[laser] hair removal clinic.
		That&apos;s on a street that crosses Coberg Road.
		The Social Security Administration office is on that same street.
		Perfect.
		I&apos;d need to take the Harlow Road route then.
		I double-checked a map, and found that there&apos;s a much easier route from Harlow Road to Coberg Road, too: the two actually intersect!
		I&apos;ve also been taking an unnecessarily long route to the hair-removal place.
		So I&apos;ll take Harlow to Coberg, then start watching addresses to find the place.
	</p>
	<p>
		Did I want to spare the time once school was back in session though?
		Obviously, I can&apos;t talk to the head manager today, but perhaps I could catch the person in charge.
		I&apos;d moped around all morning though, so I wasn&apos;t sure they&apos;d be in.
		They probably have a Monday through Friday schedule though.
		At the very least, I could get their business hours from the office building.
		Begrudgingly, off I went.
		This was my thirteenth trip to Eugene in the span of fourteen days.
	</p>
	<p>
		The trip actually wasn&apos;t that long.
		It wouldn&apos;t&apos;ve even been difficult if not for the fact that I&apos;m totally and utterly drained right now, physically.
		I didn&apos;t have a suite number, but I figured there&apos;s be an office directory inside.
		Sure enough, there was, and I found the place on the first floor.
		Closed.
		And with no posted hours.
		What do I even do?
		My heart sank as I realised that I should have left a note.
		I had a pastel pen in my purse, but I hadn&apos;t brought paper of any sort.
		The reasonable thing to do would normally be to bike back home, write the note, and bring it back.
		But that&apos;d be fourteen trips to Eugene in just as many days.
		How much longer could my strength hold out?
		I decided to look for a nearby shop that might sell me paper.
	</p>
	<p>
		The first place that seemed promising looked like a second-hand store.
		They&apos;d likely have a bag of miscellaneous pieces of fancy note paper for three dollars or something.
		It&apos;d be a bit more elegant than what I was after, but hey, it would keep me from needing to make this fourteenth trip.
		As I got closer, I noticed it was a donation centre though.
		They wouldn&apos;t have anything for sale at that location.
		I spotted a drug store next.
		There&apos;d be a good chance they&apos;d have something that&apos;d work, but I&apos;ve never found a drug store I liked.
		I&apos;d use this place as a last resort, but I should try to find somewhere less terrible to give my money to first.
		Next, another drug store.
		Finally, I spotted a printing and shipping store.
		Bingo!
	</p>
	<p>
		If I phrased it right, I could get a piece of printer paper from there.
		Maybe they sell individual pieces of printer paper for cheaper than a printed page, but I couldn&apos;t be sure they&apos;d sell blank paper at all.
		However, I could get them to &quot;print&quot; me a blank page.
		How could they turn me down?
		I just needed to ask to buy both options, whichever&apos;s available.
		So I did.
		They actually just gave me a blank page free of charge, and even lent me a pen, so I didn&apos;t even need to use the pastel one that&apos;d be a bit hard to read.
		The second trip today was averted.
		Heading back to the office suite, I slipped the note under the door.
	</p>
	<p>
		I feel even sicker now.
		All this physical exertion is more than I can take.
		I think even if I get word that everything&apos;ll be fine tomorrow, I won&apos;t be attending the $a[EUGLUG] meeting.
		The cost to benefit ration is just too high.
		I&apos;ve been working hard for two weeks now.
		Taking a week off from long-distance biking is probably the only way I&apos;m going to recover.
	</p>
	<p>
		At least in those two weeks, I got a lot done.
		I mean, on paper, it doesn&apos;t look like much, but there were some important things I&apos;ve gotten done.
		There are a number of things I don&apos;t even want to touch until I have my facial hair and my voice under control.
		I&apos;ve got both of those in the works now.
		I can&apos;t move on with my life until that work is done, and now, I&apos;ve gotten as much as I can get done for now on those fronts taken care of.
		I&apos;ve gotten the lab found, too.
		That&apos;ll be necessary for making sure my vasectomy went as well as I hope it did, or whether I instead need to get the vasectomy re-performed.
		I also saw a child forcibly baptised.
		That was terrible, and on the surface, it doesn&apos;t look like I accomplished anything by attending that.
		It showed me a side of the church I won&apos;t soon forget though, and showed me there&apos;s more I need to watch for than just what&apos;s on the surface.
		I already knew that, on some level, but this reminded me I need to keep a watchful eye out and do my best to catch the not-so-friendly parts of their beliefs.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		Today begins the term, so I suppose now&apos;s a good time to talk about the current plan as it stands.
		The university has made changes to my degree program in the past, but assuming no more changes are made to the program in the mean time, this will be my final proctored term.
		After this term, I&apos;ll have no need to bike to the other university to get my final exams proctored.
		From there, I&apos;ll have four terms of required courses that aren&apos;t proctored.
		Next, I&apos;ll supposedly have four terms of &quot;electives&quot;.
		However, due to the university&apos;s scanty course catalogue, I won&apos;t really have much choice in what courses I take.
		There will be three courses I have access to that I won&apos;t have to take, and I technically get to choose which three provided they weren&apos;t any of the required courses, but we&apos;re all pretty much taking the same courses if we&apos;re in the same degree program with very little variation.
		After that, I&apos;ll attempt to stay in the program for another term that I don&apos;t actually need to be here.
		I hate this school, but it seems a shame to skip as few as three courses.
		And for the term after that, I&apos;ll attempt to take the remaining course.
		Again, it seems a shame to leave with so little left undone.
		I might as well finish what I&apos;ve started.
		That final term will have a lighter coursework load though due to my only taking one course instead of the usual two.
	</p>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Normally, each program has its own virtual memory space.
			Basically, each program is sandboxed, so when one program accesses memory, it doesn&apos;t interfere with another program by changing what said other program sees in memory.
			However, things are a little different in a multi-threaded program.
			In some ways, it&apos;s like running multiple instances of the program, as the operating system switches between these multiple threads as it would separate processes, yet these threads share the same virtual $a[RAM] <a href="http://pages.cs.wisc.edu/~remzi/OSTEP/threads-intro.pdf">(Arpaci-Dusseau &amp; Arpaci-Dusseau, 2018)</a>.
			The program has no control over which threads will be running in what order, which means that how the code behaves can depend on the order of when threads read and/or modify certain values in virtual $a[RAM].
			This is what&apos;s known as a race condition.
		</p>
		<p>
			It&apos;s worth noting that threads within a process and separate processes have some differences in terms of implementation, but understanding these differences isn&apos;t important for understanding race conditions and how to prevent them.
		</p>
		<p>
			The simple way of dealing with this issue is to use primitive instructions that complete reads and writes together as single units.
			This method really doesn&apos;t work in practice though, because of how limited primitive instructions are.
			They wouldn&apos;t be primitives if they could complete advanced tasks.
			Advanced tasks need to be built from multiple primitives to avoid saturating the primitive instruction set with thousands of instructions for every imaginable use case.
			It&apos;s this using of multiple primitive instructions that presents the problem though, as a thread can be interrupted at any time between any pair of primitive instructions.
		</p>
		<p>
			Instead, we need a more-complex solution.
			We need a few primitive instructions that allow us to deal with synchronisation <a href="http://pages.cs.wisc.edu/~remzi/OSTEP/threads-intro.pdf">(Arpaci-Dusseau &amp; Arpaci-Dusseau, 2018)</a>.
			Unfortunately, that&apos;s where our reading material for the week stops.
			We&apos;re given no explanation on what primitives are provided or how to use them.
			Until next week, we can only speculate.
			Personally, I assume these primitives relate to locking mechanisms similar to how file locks are used to prevent multiple instances of a given program from working with the same file.
			One primitive likely locks other threads from the same process out of being able to execute, so only the thread that performed the execution is allowed to continue executing, than another primitive likely unlocks the other threads.
		</p>
		<div class="APA_references">
			<h3>References:</h3>
			<p>
				Arpaci-Dusseau, R. H., &amp; Arpaci-Dusseau, A. C. (2018, August). <a href="http://pages.cs.wisc.edu/~remzi/OSTEP/threads-intro.pdf">Concurrency: An Introduction</a>. Retrieved from <code>http://pages.cs.wisc.edu/~remzi/OSTEP/threads-intro.pdf</code>
			</p>
		</div>
	</blockquote>
</section>
END
);
